package com.Entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * Userdata entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "userdata", catalog = "monitor")
public class Userdata implements java.io.Serializable {

	// Fields

	private Integer userId;
	private Integer cardId;
	private String cardPass;
	private String realName;
	private String idcard;
	private Integer years;
	private Integer months;
	private Integer days;
	private String sex;
	private String province;
	private String city;
	private String county;
	private String userAddress;
	private String signature;
	private Date expectedDateBirth;
	private Date pregnancyDate;
	private String phoneNumber;

	// Constructors

	/** default constructor */
	public Userdata() {
	}

	/** full constructor */
	public Userdata(Integer cardId, String cardPass, String realName,
			String idcard, Integer years, Integer months, Integer days,
			String sex, String province, String city, String county,
			String userAddress, String signature, Date expectedDateBirth,
			Date pregnancyDate, String phoneNumber) {
		this.cardId = cardId;
		this.cardPass = cardPass;
		this.realName = realName;
		this.idcard = idcard;
		this.years = years;
		this.months = months;
		this.days = days;
		this.sex = sex;
		this.province = province;
		this.city = city;
		this.county = county;
		this.userAddress = userAddress;
		this.signature = signature;
		this.expectedDateBirth = expectedDateBirth;
		this.pregnancyDate = pregnancyDate;
		this.phoneNumber=phoneNumber;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "UserID", unique = true, nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "CardID")
	public Integer getCardId() {
		return this.cardId;
	}

	public void setCardId(Integer cardId) {
		this.cardId = cardId;
	}

	@Column(name = "CardPass", length = 20)
	public String getCardPass() {
		return this.cardPass;
	}

	public void setCardPass(String cardPass) {
		this.cardPass = cardPass;
	}

	@Column(name = "RealName", length = 50)
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	@Column(name = "IDCard", length = 18)
	public String getIdcard() {
		return this.idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	@Column(name = "Years")
	public Integer getYears() {
		return this.years;
	}

	public void setYears(Integer years) {
		this.years = years;
	}

	@Column(name = "Months")
	public Integer getMonths() {
		return this.months;
	}

	public void setMonths(Integer months) {
		this.months = months;
	}

	@Column(name = "Days")
	public Integer getDays() {
		return this.days;
	}

	public void setDays(Integer days) {
		this.days = days;
	}

	@Column(name = "Sex", length = 10)
	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Column(name = "Province", length = 30)
	public String getProvince() {
		return this.province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	@Column(name = "City", length = 30)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "County", length = 30)
	public String getCounty() {
		return this.county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	@Column(name = "UserAddress", length = 120)
	public String getUserAddress() {
		return this.userAddress;
	}

	public void setUserAddress(String userAddress) {
		this.userAddress = userAddress;
	}

	@Column(name = "Signature", length = 500)
	public String getSignature() {
		return this.signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ExpectedDateBirth", length = 10)
	public Date getExpectedDateBirth() {
		return this.expectedDateBirth;
	}

	public void setExpectedDateBirth(Date expectedDateBirth) {
		this.expectedDateBirth = expectedDateBirth;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "PregnancyDate", length = 10)
	public Date getPregnancyDate() {
		return this.pregnancyDate;
	}

	public void setPregnancyDate(Date pregnancyDate) {
		this.pregnancyDate = pregnancyDate;
	}
	
	@Column(name = "phoneNumber", length = 20)
	public String getPhoneNumber() {
		return this.phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

}